using Mengsk.ProxyDelivery.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mengsk.ProxyDelivery.Service
{
    public class DeliveryOutService : ServiceBase<DeliveryOut>
    {
        public DataCollection<DeliveryOut> GetByAll(int sellerId, long orderId, string deliveryCompany, string deliveryNumber, string op, DateTime startTime, DateTime endTime, int pageIndex, int pageSize)
        {
            Request req = new Request { Api = "getByAll" };
            req.Add("sellerId", sellerId);
            req.Add("orderId", orderId);
            req.Add("deliveryCompany", deliveryCompany);
            req.Add("deliveryNumber", deliveryNumber);
            req.Add("operator", op);
            req.Add("startTime", this.FormatToDBTime(startTime));
            req.Add("endTime", this.FormatToDBTime(endTime));
            req.Add("pageIndex", pageIndex);
            req.Add("pageSize", pageSize);
            return this.DoRemoteCall<DeliveryOut>(req).ToDataCollection();
        }
    }
}
